package com.santos.hw.component;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Controller("studentactionid")
@Scope("prototype")
public class StudentAction {

    @Autowired
    private StudentService studentService;

    public void execute() {
        studentService.AddStudent();
    }

    @PostConstruct
    public void init()
    {
        System.out.println("Init....");
    }

    @PreDestroy
    public void dispose()
    {
        System.out.println("Dispose....");
    }
}
